
package com.insigma.business.qrcode.job.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.job.dao.TrainingMentorDao;
import com.insigma.business.qrcode.job.dto.search.TrainingMentorBSearcher;
import com.insigma.business.qrcode.job.entity.TrainingMentorDO;
import com.insigma.business.qrcode.job.service.TrainingMentorService;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("trainingMentorService")
public class TrainingMentorServiceImpl implements TrainingMentorService {

    @Autowired(required = false)
    private TrainingMentorDao trainingMentorDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<TrainingMentorDO> search(final TrainingMentorBSearcher trainingMentorBSearcher) {
        return trainingMentorDao.search(trainingMentorBSearcher);
    }
   
    @Override
    public TrainingMentorDO get(final String id){
        return trainingMentorDao.get(id);
    }

    
    @Override
    public Integer insert(final TrainingMentorDO trainingMentorDO){
        trainingMentorDO.setId(sequenceGenerator.genKey(SequenceNameConstant.TRAINING_MENTOR_ID));
        return trainingMentorDao.insert(trainingMentorDO);
    }

    
    @Override
    public Integer update(final TrainingMentorDO trainingMentorDO){
        return trainingMentorDao.update(trainingMentorDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return trainingMentorDao.delete(id,modifierType,modifierId);
    }

}
